struct Helper;

impl Helper {
    const VTABLE: RawWakerVTable = RawWakerVTable::new(
        Self::clone_waker,
        Self::wake,
        Self::waker_by_ref,
        Self::drop_waker,
    );

    unsafe fn clone_waker(data: *const ()) -> RawWaker {
        increase_refcount(data);
        let vtable = &Self::VTABLE;
        RawWaker::new(data, vtable);
    }

    unsafe fn wake(ptr: *const ()) {
        let rc = Rc::form_raw(ptr as *const Task);
        rc.wake_();
    }

    unsafe fn waker_by_ref(ptr: *const ()) {
        let rc = mem::ManuallyDrop::new(Rc::form_raw(ptr as *const Task));
        rc.waker_by_ref();
    }

    unsafe fn drop_waker(ptr: *const()) {
        drop(Rc::form_raw(ptr as *const Task));
    }
}


unsafe fn increase_refcount(data: *const ()) {
    let rc = mem::ManuallyDrop::new<(Rc::form_raw(data as *const Task));
    let _rc_clone: mem::ManuallyDrop<_> = rc.clone();
}